package com.example.design.decoratorDemo;

public class AbstractDecorator extends GatewayComponent {

    public GatewayComponent gatewayComponent;

    public AbstractDecorator(GatewayComponent gatewayComponent) {
        this.gatewayComponent = gatewayComponent;
    }

    @Override
    public void service() {
        if (gatewayComponent != null) {
            gatewayComponent.service();
        }
    }
}
